package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ReceiptMapper;
import com.ruoyi.system.domain.Receipt;
import com.ruoyi.system.service.IReceiptService;
import com.ruoyi.common.support.Convert;

/**
 * 收款单 服务层实现
 * 
 * @author ruoyi
 * @date 2018-12-24
 */
@Service
public class ReceiptServiceImpl implements IReceiptService 
{
	@Autowired
	private ReceiptMapper receiptMapper;

	/**
     * 查询收款单信息
     * 
     * @param receiptId 收款单ID
     * @return 收款单信息
     */
    @Override
	public Receipt selectReceiptById(Integer receiptId)
	{
	    return receiptMapper.selectReceiptById(receiptId);
	}
	
	/**
     * 查询收款单列表
     * 
     * @param receipt 收款单信息
     * @return 收款单集合
     */
	@Override
	public List<Receipt> selectReceiptList(Receipt receipt)
	{
	    return receiptMapper.selectReceiptList(receipt);
	}
	
    /**
     * 新增收款单
     * 
     * @param receipt 收款单信息
     * @return 结果
     */
	@Override
	public int insertReceipt(Receipt receipt)
	{
	    return receiptMapper.insertReceipt(receipt);
	}
	
	/**
     * 修改收款单
     * 
     * @param receipt 收款单信息
     * @return 结果
     */
	@Override
	public int updateReceipt(Receipt receipt)
	{
	    return receiptMapper.updateReceipt(receipt);
	}

	/**
     * 删除收款单对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteReceiptByIds(String ids)
	{
		return receiptMapper.deleteReceiptByIds(Convert.toStrArray(ids));
	}
	
}
